package util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by jmy on 20/9/18.
 */
public final class PhoneUtil {

    public static boolean isPhone(String phone) {


        String regExp = "^((110)|(13[0-9])|(14[5,6,7,9])|(15[^4])|(16[0-9])|(18[0-9])|(17[0-8])|(19[0|1|2|3|5|6|7|8|9]))\\d{8}$";
        Pattern p = Pattern.compile(regExp);
        Matcher m = p.matcher(phone);
        return m.matches();
    }
}
